using System.Collections.Generic;
using System.Linq;
using EPiServer.Common.Categories;

namespace OpenWaves.ActivityFeed.EPiServer.Community
{
    public static class CategoryExtensions
    {
        public static IEnumerable<Topic>  AsTopics(this CategoryCollection categories)
        {
            return categories.Select(AsTopics);
        }

        private static Topic AsTopics(ICategory c)
        {
            return new Topic("EPiServerCommunityCategory/" + c.ID);
        }
    }
}